import axios from "../axios"

/**
 * 服务相关接口
 */
export default class facility {
  // 设施设备列表
  static async getFacilitiesList(params) {
    let res = await axios.post('/business/facilities/getFacilitiesList', params)
    return res.data.data
  }
  // 设备类别列表
  static async getCategoryList() {
    let res = await axios.get(`/business/facilities/getCategoryList`)
    return res.data
  }
  // 设备列表
  static async getCategoryNameList(id) {
    let res = await axios.get(`/business/facilities/getCategoryNameList?pidNumber=`+id)
    return res.data
  }

  // 新增设备
  static async insertFacility(params) {
    let res = await axios.post('/business/facilities/insertFacilities', params)
    return res.data
  }

  // 修改设备
  static async updateFacility(params) {
    let res = await axios.post('/business/facilities/updateFacilities', params)
    return res.data
  }

   // 设备详情
   static async getFacilityDetail(id) {
    let res = await axios.get(`/business/facilities/getFacilitiesDetail?id=`+id)
    return res.data
  }

   // 设备详情
   static async deleteById(id) {
    let res = await axios.get(`/business/facilities/deleteFacilitiesLogic?id=`+id)
    return res.data
  }

  // 停止服务
  static async discontinueService(params) {
    let res = await axios.post('/business/orgService/discontinueService', params)
    return res.data
  }
  
  // 服务修改备注
  static async updateNotes(params) {
    let res = await axios.post(`/business/orgService/updateNotes`,params)
    return res.data
  }
}